import Vue from "vue";
import Vuex from "vuex";
import app from "./modules/app";
import user from "./modules/user";
import getters from "./getters";
import fly from "./modules/fly";
import webscoket from "./modules/wescoket";
import permission from './modules/permission'
import createPersistedState from 'vuex-persistedstate'

Vue.use(Vuex);

const store = new Vuex.Store({
  modules: {
    app,
    user,
    fly,
    permission,
    webscoket
  },
  getters,
  plugins: [createPersistedState({
    paths: ['app.videoSrc', 'app.videoId']
  })]
});

export default store;
